import "dotenv/config";
import inquirer from "inquirer";

import { questions } from "./questions/buyProduct";
import { buyProduct } from "./utils/buyProduct";

inquirer.prompt(questions).then(async (answers) => {
  if (answers.count <= 5 && answers.count >= 1) {
    await Promise.all(new Array(answers.count).fill('').map(() => buyProduct()))
  }
});
